/**
 * 
 */
package net.cloudcodex.client.character.view;

import java.util.Date;

import net.cloudcodex.client.character.view.CharactersView.Message;
import net.cloudcodex.client.character.view.panel.CharacterPanel;

import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.user.client.ui.FlowPanel;
import com.google.gwt.user.client.ui.IsWidget;
import com.google.inject.Inject;

/**
 * @author Daniel
 * 
 */
public class CharacterViewImpl extends FlowPanel implements CharacterView {

	private Message message;
	private CharacterPanel characterPanel;

	@Inject
	public CharacterViewImpl(Message message) {
		this.message = message;
		characterPanel = new CharacterPanel(message);
		this.add(characterPanel);
	}

	@Override
	public void addNotification(String message, Date date) {
		characterPanel.addNotification(message, date);
	}


	@Override
	public HasClickHandlers getNotificationListBox() {
		return characterPanel.getNotificationListBox();
	}

	@Override
	public HasClickHandlers getToggleButtonGroup() {
		return characterPanel.getToggleButtonGroup();
	}

	@Override
	public void setSelectedContent(String selectedContent) {
		characterPanel.setSelectedButton(selectedContent);
	}

	@Override
	public void refreshContent(IsWidget isWidget){
		characterPanel.refreshContent(isWidget);
	}
	
}
